package org.zero.onlinesubject.mapper;

import org.zero.onlinesubject.common.vo.CourseVo;
import org.zero.onlinesubject.entity.Course;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * @Entity org.zero.onlinesubject.entity.Course
 */
public interface CourseMapper extends BaseMapper<Course> {

    List<Course> getCourseListById(String userId, Integer start, Integer end);

    List<Course> getCourseList(Integer start, Integer end);

    int getUserCourseCount(String userId);

    int getCourseListCount();

    int userJoinCourse(String userId,String courseId);

    List<CourseVo> getHot();

    void updateViewCount(String courseId);

    void updateLikeCount(String courseId);

    List<CourseVo> getCourseByCond(String tagCode,String typeCode,Integer current,Integer size);

    int getCourseCountByCond(String tagCode,String typeCode,Integer current,Integer size);

    List<CourseVo> getCourseBySearch(String courseName,Integer current,Integer size);

    int getCourseSearchCount(String courseName);

    CourseVo getCourseVo(String courseId);

    List<CourseVo> getOwnCourse(String userId);

    List<CourseVo> getMyLearn(String userid);

    Integer isExists(String userId, String courseId);

    List<Course> getTop5();

    List<Course> selectOwnCourseName(String userid);

    List<String> getCourseLearnUserId(String CourseId);

    void deleteUserCourse(String courseId);
}




